import { Injectable } from '@nestjs/common'
import { ConfigService } from '@nestjs/config'
import {
  WinstonModuleOptions,
  WinstonModuleOptionsFactory
} from '@ttou/nest-winston'

@Injectable()
export class WinstonOptionsService implements WinstonModuleOptionsFactory {
  constructor(private configService: ConfigService) {}

  createWinstonModuleOptions(): WinstonModuleOptions {
    return this.configService.get('winston')
  }
}
